<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   QiuYixuan: 中秋献礼——Layer图形设备  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({
          tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
          TeX: {equationNumbers: {autoNumber: "AMS"}}
        });
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/2011/09/layer-graphics-device/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466442276: Accept with keywords: (title(0.4):中国,统计学,图形,服务平台,门户网站, topn(0.3):软件应用,二进制,画图,统计学,R语言,字体,数据挖掘,图形,变量名,运行库,中文论坛,参数,文章,时间序列,图层,绘制,中国人民大学,视频,徐海,软件包,问题,命令,学院,会议,错误,作图,程序,图例,评论,论坛).-->
 </head>
 <body class="single single-post postid-4185 single-format-standard sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    QiuYixuan: 中秋献礼——Layer图形设备
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/">
       <img src="http://cos.name/wp-content/themes/COS-kermesinus/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <a class="screen-reader-text skip-link" href="http://cos.name/2011/09/layer-graphics-device/#content" title="跳至内容">
        跳至内容
       </a>
       <div class="menu-%e6%88%91%e7%9a%84%e8%8f%9c%e5%8d%95-container">
        <ul class="nav-menu" id="menu-%e6%88%91%e7%9a%84%e8%8f%9c%e5%8d%95">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-4746" id="menu-item-4746">
          <a href="http://cos.name">
           主页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-8120" id="menu-item-8120">
          <a href="http://cos.name/cn">
           论坛
          </a>
          <ul class="sub-menu">
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8124" id="menu-item-8124">
            <a href="http://cos.name/cn/wp-login.php?action=register">
             论坛注册
            </a>
           </li>
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8125" id="menu-item-8125">
            <a href="http://cos.name/cn/wp-login.php">
             论坛登录
            </a>
           </li>
          </ul>
         </li>
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8110" id="menu-item-8110">
          <a href="http://cos.name/books/">
           图书资料
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8112" id="menu-item-8112">
          <a href="http://cos.name/videos">
           视频教程
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8333" id="menu-item-8333">
          <a href="http://cos.name/salon/">
           统计沙龙
          </a>
         </li>
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8111" id="menu-item-8111">
          <a href="http://cos.name/chinar/">
           R语言会议
          </a>
         </li>
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8109" id="menu-item-8109">
          <a href="http://cos.name/training/">
           讲座与培训
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8115" id="menu-item-8115">
          <a href="http://cos.name/cn/forum/comprehensive/job/">
           招聘信息
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-4780" id="menu-item-4780">
          <a href="http://cos.name/about">
           关于我们
          </a>
          <ul class="sub-menu">
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8113" id="menu-item-8113">
            <a href="http://cos.name/2008/11/how-to-work-with-cos/">
             加入我们
            </a>
           </li>
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8119" id="menu-item-8119">
            <a href="http://cos.name/donate/">
             赞助我们
            </a>
           </li>
           <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8114" id="menu-item-8114">
            <a href="http://cos.name/cn/forum/26">
             项目合作
            </a>
           </li>
          </ul>
         </li>
        </ul>
       </div>
       <form action="http://cos.name/" class="search-form" method="get" role="search">
        <label>
         <span class="screen-reader-text">
          搜索：
         </span>
        </label>
       </form>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-4185 post type-post status-publish format-standard hentry category-graphics category-packages category-software tag-layer tag-r-language tag-499 tag-498" id="post-4185">
        <header class="entry-header">
         <h1 class="entry-title">
          中秋献礼——Layer图形设备
         </h1>
         <div class="entry-meta">
          <span class="date">
           <a href="http://cos.name/2011/09/layer-graphics-device/" rel="bookmark" title="链向中秋献礼——Layer图形设备的固定链接">
            <time class="entry-date" datetime="2011-09-12T22:23:11+00:00">
             2011/09/12
            </time>
           </a>
          </span>
          <span class="categories-links">
           <a href="http://cos.name/category/software/graphics/" rel="category tag">
            统计图形
           </a>
           、
           <a href="http://cos.name/category/software/packages/" rel="category tag">
            统计软件
           </a>
           、
           <a href="http://cos.name/category/software/" rel="category tag">
            软件应用
           </a>
          </span>
          <span class="tags-links">
           <a href="http://cos.name/tag/layer/" rel="tag">
            Layer
           </a>
           、
           <a href="http://cos.name/tag/r-language/" rel="tag">
            R语言
           </a>
           、
           <a href="http://cos.name/tag/%e5%9b%be%e5%b1%82/" rel="tag">
            图层
           </a>
           、
           <a href="http://cos.name/tag/%e5%9b%be%e5%bd%a2%e8%ae%be%e5%a4%87/" rel="tag">
            图形设备
           </a>
          </span>
          <span class="author vcard">
           <a class="url fn n" href="http://cos.name/author/yixuanq/" rel="author" title="查看所有由邱怡轩发布的文章">
            邱怡轩
           </a>
          </span>
         </div>
         <!-- .entry-meta -->
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <p>
          <a href="http://cos.name/wp-content/uploads/2011/09/Festival2.png">
           <img src="http://cos.name/wp-content/uploads/2011/09/Festival2-500x214.png"/>
          </a>
          <br/>
          你在用R画图的时候，是否会遇到以下的麻烦：
         </p>
         <ul>
          <li>
           加图例或文字时总是对不准坐标，要花很多精力调整元素的位置；
          </li>
          <li>
           某个细节出错，整幅图得重新绘制；
          </li>
          <li>
           想要更酷的平移、拉伸、旋转操作，就好像在Gimp或Photoshop里面一样；
          </li>
          <li>
           想更方便地使用字体，特别是中文的显示。
          </li>
         </ul>
         <p>
          于是接下来就有一个好消息和一个坏消息。好消息是有一个软件包可以解决上面的大部分问题了，而坏消息是这个包仍然处于开发阶段，所以各种bug是难以避免的。今天恰逢中秋，我便把这个自己编写的Layer软件包介绍给大家，算是送给大家的一份小礼物。
         </p>
         <p>
          Layer顾名思义，指的是图层，而这个绘图设备正是采用了图层的思想。在你用Layer画图时，你可以将不同的图形元素放在不同的层上，彼此之间互不影响。例如，你可以将图例单独建立一个图层，当图例移动时，下层的图形并不会发生变化，再加上一定的鼠标操作，就可以方便地绘制出美观的图形。
         </p>
         <p>
          为了让大家能直观地感受Layer的操作，下面给出了一段Layer的操作演示视频。
         </p>
         <p>
         </p>
         <center>
          <embed align="middle" allowfullscreen="true" allowscriptaccess="always" height="400" quality="high" src="http://player.youku.com/player.php/sid/XMzAzNDkyNTU2/v.swf" type="application/x-shockwave-flash" width="480">
          </embed>
         </center>
         <p>
         </p>
         <p>
          此外，Layer有着更方便的字体支持。在打开Layer图形设备时，你可以指定一个ttf字体文件作为图形字体的来源，如果参数为
          <code>
           NULL
          </code>
          ，则图形会使用软件包自带的
          <a href="http://wenq.org" target="_blank">
           文泉驿
          </a>
          微米黑字体。
         </p>
         <p>
          Layer软件包的下载地址如下。需要说明的是，Layer需要GTK+环境的支持，对于Windows用户，如果你已经安装了GTK+环境，请选择第二个下载地址；如果尚未安装，可以直接下载第三个文件（软件包中附带了GTK+）。
         </p>
         <p>
          <a href="http://yixuan.cos.name/cn/wp-content/uploads/2011/09/Layer_0.1-0.tar.gz" target="_blank">
           下载：源代码
          </a>
          <br/>
          <a href="http://yixuan.cos.name/cn/wp-content/uploads/2011/09/Layer_0.1-0.zip" target="_blank">
           下载：Windows二进制包
          </a>
          <br/>
          <a href="http://yixuan.cos.name/cn/wp-content/uploads/2011/09/Layer.zip" target="_blank">
           下载：Windows二进制包（含GTK+运行库）
          </a>
         </p>
         <div class="wumii-hook">
          <br/>
          <br/>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
         <div class="author-info">
          <div class="author-avatar">
           <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
          </div>
          <!-- .author-avatar -->
          <div class="author-description">
           <h2 class="author-title">
            关于邱怡轩
           </h2>
           <p class="author-bio">
            中国人民大学统计学院硕士，普渡（
            <del>
             众生
            </del>
            ）大学博士研究僧
            <a class="author-link" href="http://cos.name/author/yixuanq/" rel="author">
             查看所有由邱怡轩发表的文章
             <span class="meta-nav">
              →
             </span>
            </a>
           </p>
          </div>
          <!-- .author-description -->
         </div>
         <!-- .author-info -->
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
       <nav class="navigation post-navigation" role="navigation">
        <h1 class="screen-reader-text">
         文章导航
        </h1>
        <div class="nav-links">
         <a href="http://cos.name/2011/08/meaning-of-traveling/" rel="prev">
          <span class="meta-nav">
           ←
          </span>
          旅行的意义：一个人大本科女生大学四年的故事
         </a>
         <a href="http://cos.name/2011/09/chinar-2011-sh/" rel="next">
          第四届中国R语言会议(上海会场)通知
          <span class="meta-nav">
           →
          </span>
         </a>
        </div>
        <!-- .nav-links -->
       </nav>
       <!-- .navigation -->
       <div class="comments-area" id="comments">
        <h2 class="comments-title">
         《
         <span>
          中秋献礼——Layer图形设备
         </span>
         》有27个想法
        </h2>
        <ol class="comment-list">
         <li class="comment even thread-even depth-1" id="comment-2433">
          <article class="comment-body" id="div-comment-2433">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/e787625af13288963c5a63bd2a4e5e82?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://gaotao.name/cn" rel="external nofollow">
               gaotao
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2433">
              <time datetime="2011-09-12T23:02:29+00:00">
               2011/09/12 23:02
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             这个沙发先抢着啊`礼也赶紧收下~~:)
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给gaotao" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2433#respond" onclick='return addComment.moveForm( "div-comment-2433", "2433", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1" id="comment-2434">
          <article class="comment-body" id="div-comment-2434">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/62b5e49d0d3058fc1e5c784dd8e51727?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              jah_et
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2434">
              <time datetime="2011-09-12T23:13:59+00:00">
               2011/09/12 23:13
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             抢占板凳，围观高手！
             <br/>
             这个的确好用~
             <br/>
             顺祝各位中秋快乐！
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给jah_et" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2434#respond" onclick='return addComment.moveForm( "div-comment-2434", "2434", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1 parent" id="comment-2435">
          <article class="comment-body" id="div-comment-2435">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/d19771d1bc21527d890897395a234423?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://dreamhunter.me/cn" rel="external nofollow">
               Weicheng
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2435">
              <time datetime="2011-09-13T10:34:13+00:00">
               2011/09/13 10:34
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             太给力了，快速调整图形细节已不再是梦！
             <br/>
             另外，最终调整好的图形能返回相应的参数么，比如坐标位置，旋转角度等等，那样的话就太棒了。
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给Weicheng" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2435#respond" onclick='return addComment.moveForm( "div-comment-2435", "2435", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-yixuanq bypostauthor odd alt depth-2" id="comment-2447">
            <article class="comment-body" id="div-comment-2447">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                邱怡轩
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2447">
                <time datetime="2011-09-16T08:54:08+00:00">
                 2011/09/16 08:54
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               这个可以啊，平移旋转拉伸本质上都是将原来的坐标左乘一个变换矩阵，这个矩阵会被记录下来的，不过怎样让展示出来的数值容易看懂还得考虑一会儿。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给邱怡轩" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2447#respond" onclick='return addComment.moveForm( "div-comment-2447", "2447", "respond", "4185" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1 parent" id="comment-2458">
          <article class="comment-body" id="div-comment-2458">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/beb28b4c33272862492bbcfde1d3d751?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              徐海龙
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2458">
              <time datetime="2011-09-23T02:58:48+00:00">
               2011/09/23 02:58
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             为什么我按照操作只加进去了title图层，legend和thanks两个图层加不进去呢？而且把title图层的名字改了就提示没有那个函数呢？
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给徐海龙" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2458#respond" onclick='return addComment.moveForm( "div-comment-2458", "2458", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-yixuanq bypostauthor odd alt depth-2 parent" id="comment-2459">
            <article class="comment-body" id="div-comment-2459">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                邱怡轩
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2459">
                <time datetime="2011-09-23T08:11:38+00:00">
                 2011/09/23 08:11
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               把你输过的命令写出来我看看？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给邱怡轩" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2459#respond" onclick='return addComment.moveForm( "div-comment-2459", "2459", "respond", "4185" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment even depth-3" id="comment-2460">
              <article class="comment-body" id="div-comment-2460">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/beb28b4c33272862492bbcfde1d3d751?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  徐海龙
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2460">
                  <time datetime="2011-09-23T22:36:33+00:00">
                   2011/09/23 22:36
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <pre>library(Layer)
Layer()
x=seq(-pi,pi,len=41)
plot(x,sin(x),type="l",ylim=c(-2,2),col=2,lty=2)
points(x,cos(x),pch=3,col=4)
add.layer("title")
title("legend(***,lty=c(-2,2),pch=c(-2,3))",cex.main=1,1)
add.layer("legend")
legend(-1，2，c("sin","cos"),col=(3,4),lty=c(2,-1),
       pch=c(-3,3),bg="gray99")</pre>
                <p>
                 上面这段，执行完添加legend图层，原图没有任何变化
                </p>
                <p>
                 将title换成legend，重新执行，结果提示命令错误，如下
                </p>
                <pre>&gt; library(Layer)
&gt; Layer()
&gt; x=seq(-pi,pi,len=41)
&gt; plot(x,sin(x),type="l",ylim=c(-2,2),col=2,lty=2)
&gt; points(x,cos(x),pch=3,col=4)
&gt; add.layer("legend")
&gt; legend("legend(***,lty=c(-2,2),pch=c(-2,3))",
+        cex.main=1,1)
错误于legend("legend(***,lty=c(-2,2),pch=c(-2,3))",
            cex.main = 1, 1) : 
  参数((cex.main = 1)) 没有用
&gt; legend("legend(***,lty=c(-2,2),pch=c(-2,3))",1)
错误于is.language(x) : 缺少'x'</pre>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-2461">
          <article class="comment-body" id="div-comment-2461">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/beb28b4c33272862492bbcfde1d3d751?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              徐海龙
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2461">
              <time datetime="2011-09-23T22:38:28+00:00">
               2011/09/23 22:38
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             补充一下，我是新手，也没系统看过R For Beginners等资料
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给徐海龙" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2461#respond" onclick='return addComment.moveForm( "div-comment-2461", "2461", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-yixuanq bypostauthor even depth-2 parent" id="comment-2462">
            <article class="comment-body" id="div-comment-2462">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                邱怡轩
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2462">
                <time datetime="2011-09-23T23:22:41+00:00">
                 2011/09/23 23:22
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               你应该是有些命令打错了，比如
               <code>
                col=(3,4)
               </code>
               应该是
               <code>
                col = c(3, 4)
               </code>
               ，
               <code>
                cex.main=1,1
               </code>
               应该是
               <code>
                cex.main = 1.1
               </code>
               等等。
               <br/>
               完整的程序在下面：
              </p>
              <pre>x = seq(-pi, pi, len = 65);
plot(x, sin(x), type = "l", ylim = c(-1.2, 1.8),
     col = 3, lty = 2);
points(x, cos(x), pch = 3, col = 4);

add.layer("title");
title("This is the title", cex.main = 1.1);

add.layer("legend");
legend(-1, 1.9, c("sin", "cos"), col = c(3, 4),
       text.col = "green4", lty = c(2, -1),
       pch = c(-1, 3), merge = TRUE, bg = "gray90");</pre>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给邱怡轩" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2462#respond" onclick='return addComment.moveForm( "div-comment-2462", "2462", "respond", "4185" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3 parent" id="comment-2463">
              <article class="comment-body" id="div-comment-2463">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/beb28b4c33272862492bbcfde1d3d751?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  徐海龙
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2463">
                  <time datetime="2011-09-23T23:36:12+00:00">
                   2011/09/23 23:36
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 copy你写的命令进行执行，还是没出现legend图层，软件包加载的是Windows二进制包（含GTK+运行库），系统Vista Basic
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-yixuanq bypostauthor even depth-3" id="comment-2465">
              <article class="comment-body" id="div-comment-2465">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  邱怡轩
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2465">
                  <time datetime="2011-09-24T22:20:54+00:00">
                   2011/09/24 22:20
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 嗯，那或许是程序还不完善吧，等我日后再修复一下这个问题。你在别的电脑上也会有同样的问题吗？
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1" id="comment-2464">
          <article class="comment-body" id="div-comment-2464">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/a086ac30b34454df3c6c93aef9ea9d00?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              ZY@SH
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2464">
              <time datetime="2011-09-24T11:07:24+00:00">
               2011/09/24 11:07
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             niubility
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给ZY@SH" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2464#respond" onclick='return addComment.moveForm( "div-comment-2464", "2464", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1" id="comment-2466">
          <article class="comment-body" id="div-comment-2466">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/beb28b4c33272862492bbcfde1d3d751?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              徐海龙
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2466">
              <time datetime="2011-09-26T14:15:19+00:00">
               2011/09/26 14:15
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             在别的机器上测试了一下，仍是存在同样的问题。
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给徐海龙" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2466#respond" onclick='return addComment.moveForm( "div-comment-2466", "2466", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1" id="comment-2492">
          <article class="comment-body" id="div-comment-2492">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/7466436733e8691a63a9f7af4651e014?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://ygc.name" rel="external nofollow">
               ygc
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2492">
              <time datetime="2011-09-28T20:18:23+00:00">
               2011/09/28 20:18
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             牛B啊。
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给ygc" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2492#respond" onclick='return addComment.moveForm( "div-comment-2492", "2492", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-even depth-1" id="comment-2503">
          <article class="comment-body" id="div-comment-2503">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/327944a74d2fb6fdcd57fbbe1d2d7bf8?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              se7en
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2503">
              <time datetime="2011-10-03T23:03:08+00:00">
               2011/10/03 23:03
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             作者你好：
             <br/>
             感谢你的礼物啊，不过在我的机子上运行有以下错误，我菜鸟请教以下。
             <br/>
             如：1.打入plot(x,sin(x),type=”1″,ylim=c(-1.2,1.8),col=3,lty=2)
             <br/>
             会提示绘图种类‘1’不对，然后把type=1删掉后就可以通过，为啥？
             <br/>
             2.当打入get.layers()后，为什么ID只有一个，而你的有三个不同ID，程序完全照你抄的（除了在1中说删去type-=1），为啥？
             <br/>
             再次感谢你的无私奉献！
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给se7en" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2503#respond" onclick='return addComment.moveForm( "div-comment-2503", "2503", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-2504">
          <article class="comment-body" id="div-comment-2504">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/327944a74d2fb6fdcd57fbbe1d2d7bf8?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              se7en
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2504">
              <time datetime="2011-10-03T23:07:39+00:00">
               2011/10/03 23:07
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             作者你好：
             <br/>
             第二问题已经解决了，第一个问题还是求解
             <br/>
             谢谢！
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给se7en" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2504#respond" onclick='return addComment.moveForm( "div-comment-2504", "2504", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-yixuanq bypostauthor even depth-2" id="comment-2505">
            <article class="comment-body" id="div-comment-2505">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                邱怡轩
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2505">
                <time datetime="2011-10-03T23:30:18+00:00">
                 2011/10/03 23:30
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               应该是
               <code>
                type="l"
               </code>
               ，是字母L的小写，不是数字1哈。
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给邱怡轩" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2505#respond" onclick='return addComment.moveForm( "div-comment-2505", "2505", "respond", "4185" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1 parent" id="comment-2588">
          <article class="comment-body" id="div-comment-2588">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/992a69cb431b2046b822ed203d786e15?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              张宇
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2588">
              <time datetime="2011-11-17T23:23:43+00:00">
               2011/11/17 23:23
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             添加图层之后不能修改上一个图层么
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给张宇" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2588#respond" onclick='return addComment.moveForm( "div-comment-2588", "2588", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-yixuanq bypostauthor even depth-2 parent" id="comment-2589">
            <article class="comment-body" id="div-comment-2589">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                邱怡轩
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2589">
                <time datetime="2011-11-18T10:17:01+00:00">
                 2011/11/18 10:17
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               需要哪些修改操作？
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给邱怡轩" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2589#respond" onclick='return addComment.moveForm( "div-comment-2589", "2589", "respond", "4185" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3 parent" id="comment-2591">
              <article class="comment-body" id="div-comment-2591">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/992a69cb431b2046b822ed203d786e15?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张宇
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2591">
                  <time datetime="2011-11-18T12:20:28+00:00">
                   2011/11/18 12:20
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 能不能选择图层进行修改，现在好像只有置顶的图层才能修改。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-yixuanq bypostauthor even depth-3" id="comment-2592">
              <article class="comment-body" id="div-comment-2592">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/f09663fd5fc04bad5e5b09daddb86fe6?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  邱怡轩
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2592">
                  <time datetime="2011-11-18T13:21:52+00:00">
                   2011/11/18 13:21
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 可以啊，就是用
                 <code>
                  set.current.layer()
                 </code>
                 ，视频里面有介绍。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-odd thread-alt depth-1 parent" id="comment-2594">
          <article class="comment-body" id="div-comment-2594">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/992a69cb431b2046b822ed203d786e15?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              张宇
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2594">
              <time datetime="2011-11-18T17:15:28+00:00">
               2011/11/18 17:15
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             非常感谢，我说找来找去没有示范程序，原来在视频里，原谅我，我们这网速太慢，看到视频从来都是跳过，可否楼主请教线性回归作图，如何默认作图把x轴标记为变量名（上百个变量），谢谢。
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给张宇" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2594#respond" onclick='return addComment.moveForm( "div-comment-2594", "2594", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
          <ol class="children">
           <li class="comment byuser comment-author-yihui even depth-2 parent" id="comment-2597">
            <article class="comment-body" id="div-comment-2597">
             <footer class="comment-meta">
              <div class="comment-author vcard">
               <img src="http://sdn.geekzu.org/avatar/1022d8e6ebc94e8f6bca9a86cebe312a?s=74&amp;d=monsterid&amp;r=g"/>
               <b class="fn">
                <a class="url" href="http://yihui.name" rel="external nofollow">
                 谢益辉
                </a>
               </b>
               <span class="says">
                说道：
               </span>
              </div>
              <!-- .comment-author -->
              <div class="comment-metadata">
               <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2597">
                <time datetime="2011-11-19T03:52:53+00:00">
                 2011/11/19 03:52
                </time>
               </a>
              </div>
              <!-- .comment-metadata -->
             </footer>
             <!-- .comment-meta -->
             <div class="comment-content">
              <p>
               一张A4纸，宽度约20厘米，若要放100个变量名，则每个变量名有2毫米的宽度，我给你一根铅笔，请你在2毫米宽下写变量名，你能完成吗？
              </p>
              <p>
               另：无关问题请到论坛问
               <a href="http://cos.name/cn/" rel="nofollow">
                http://cos.name/cn/
               </a>
              </p>
             </div>
             <!-- .comment-content -->
             <div class="reply">
              <a aria-label="回复给谢益辉" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=2597#respond" onclick='return addComment.moveForm( "div-comment-2597", "2597", "respond", "4185" )' rel="nofollow">
               回复
              </a>
             </div>
            </article>
            <!-- .comment-body -->
            <ol class="children">
             <li class="comment odd alt depth-3" id="comment-2598">
              <article class="comment-body" id="div-comment-2598">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/992a69cb431b2046b822ed203d786e15?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  张宇
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2598">
                  <time datetime="2011-11-19T12:49:03+00:00">
                   2011/11/19 12:49
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 谢老师这么说，我们搞生物的情何以堪啊。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
             <li class="comment byuser comment-author-yihui even depth-3" id="comment-2599">
              <article class="comment-body" id="div-comment-2599">
               <footer class="comment-meta">
                <div class="comment-author vcard">
                 <img src="http://sdn.geekzu.org/avatar/1022d8e6ebc94e8f6bca9a86cebe312a?s=74&amp;d=monsterid&amp;r=g"/>
                 <b class="fn">
                  <a class="url" href="http://yihui.name" rel="external nofollow">
                   谢益辉
                  </a>
                 </b>
                 <span class="says">
                  说道：
                 </span>
                </div>
                <!-- .comment-author -->
                <div class="comment-metadata">
                 <a href="http://cos.name/2011/09/layer-graphics-device/#comment-2599">
                  <time datetime="2011-11-19T12:51:43+00:00">
                   2011/11/19 12:51
                  </time>
                 </a>
                </div>
                <!-- .comment-metadata -->
               </footer>
               <!-- .comment-meta -->
               <div class="comment-content">
                <p>
                 我没说搞生物的怎样，我是让你想想这件事情是否具有可操作性。
                </p>
                <p>
                 本文是讨论layer设备，并非R作图，所以我建议你把无关问题移到论坛讨论。
                </p>
               </div>
               <!-- .comment-content -->
              </article>
              <!-- .comment-body -->
             </li>
             <!-- #comment-## -->
            </ol>
            <!-- .children -->
           </li>
           <!-- #comment-## -->
          </ol>
          <!-- .children -->
         </li>
         <!-- #comment-## -->
         <li class="comment odd alt thread-even depth-1" id="comment-4068">
          <article class="comment-body" id="div-comment-4068">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/853824d40ff888b0938c960be55d80a1?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              王家平
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-4068">
              <time datetime="2013-04-21T17:03:47+00:00">
               2013/04/21 17:03
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             我是初学者，刚学会画图，感觉这个特有用了，下载软件包下载不了，能否发一份给我。谢谢！2006wjp@163.com
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给王家平" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=4068#respond" onclick='return addComment.moveForm( "div-comment-4068", "4068", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
         <li class="comment even thread-odd thread-alt depth-1" id="comment-5259">
          <article class="comment-body" id="div-comment-5259">
           <footer class="comment-meta">
            <div class="comment-author vcard">
             <img src="http://sdn.geekzu.org/avatar/?s=74&amp;d=monsterid&amp;r=g"/>
             <b class="fn">
              <a class="url" href="http://weibo.com/banmudi" rel="external nofollow">
               半亩地004
              </a>
             </b>
             <span class="says">
              说道：
             </span>
            </div>
            <!-- .comment-author -->
            <div class="comment-metadata">
             <a href="http://cos.name/2011/09/layer-graphics-device/#comment-5259">
              <time datetime="2014-01-08T23:27:45+00:00">
               2014/01/08 23:27
              </time>
             </a>
            </div>
            <!-- .comment-metadata -->
           </footer>
           <!-- .comment-meta -->
           <div class="comment-content">
            <p>
             您好，我一直苦恼于图形legend的调整，但是上面的链接下载不了，能否提供一份。谢谢。hbzhoukuang@163.com
            </p>
           </div>
           <!-- .comment-content -->
           <div class="reply">
            <a aria-label="回复给半亩地004" class="comment-reply-link" href="http://cos.name/2011/09/layer-graphics-device/?replytocom=5259#respond" onclick='return addComment.moveForm( "div-comment-5259", "5259", "respond", "4185" )' rel="nofollow">
             回复
            </a>
           </div>
          </article>
          <!-- .comment-body -->
         </li>
         <!-- #comment-## -->
        </ol>
        <!-- .comment-list -->
        <div class="comment-respond" id="respond">
         <h3 class="comment-reply-title" id="reply-title">
          发表评论
          <small>
           <a href="http://cos.name/2011/09/layer-graphics-device/#respond" id="cancel-comment-reply-link" rel="nofollow" style="display:none;">
            取消回复
           </a>
          </small>
         </h3>
         <form action="http://cos.name/wp-comments-post.php" class="comment-form" id="commentform" method="post" novalidate="">
          <p class="comment-notes">
           <span id="email-notes">
            电子邮件地址不会被公开。
           </span>
           必填项已用
           <span class="required">
            *
           </span>
           标注
          </p>
          <p class="comment-form-comment">
           <label for="comment">
            评论
           </label>
           <textarea aria-required="true" cols="45" id="comment" maxlength="65525" name="comment" required="required" rows="8">
           </textarea>
          </p>
          <p class="comment-form-author">
           <label for="author">
            姓名
            <span class="required">
             *
            </span>
           </label>
          </p>
          <p class="comment-form-email">
           <label for="email">
            电子邮件
            <span class="required">
             *
            </span>
           </label>
          </p>
          <p class="comment-form-url">
           <label for="url">
            站点
           </label>
          </p>
          <p class="form-submit">
          </p>
          <p style="display: none;">
          </p>
          <p style="display: none;">
          </p>
         </form>
        </div>
        <!-- #respond -->
       </div>
       <!-- #comments -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          关注统计之都
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            新浪微博
            <a href="http://weibo.com/cosname">
             @统计之都
            </a>
           </li>
           <li>
            人人网
            <a href="http://renren.com/cosname">
             @统计之都
            </a>
           </li>
           <li>
            Twitter
            <a href="http://twitter.com/cos_name">
             @cos_name
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-6">
         <h3 class="widget-title">
          微信公众平台
         </h3>
         <div class="textwidget">
          <img src="http://cos.name/wp-content/uploads/2013/04/qrcode-8cm.jpg"/>
          <p style="font-size:12px;margin-left:15px">
           微信号 CapStat
          </p>
          <p>
           我们将第一时间向您推送主站和论坛的精彩内容，以及统计之都的线下活动、竞赛、培训和会议信息。
          </p>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-8">
         <h3 class="widget-title">
          站内导航
         </h3>
         <div class="textwidget">
          <ul>
           <li class="page_item">
            <a href="http://cos.name/cn/">
             中文论坛
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/videos/">
             视频
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/salon/">
             统计沙龙
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/books/">
             图书出版
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/training/">
             教育培训
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/about/">
             关于我们
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/donate/">
             捐赠
            </a>
           </li>
           <li class="page_item">
            <a href="http://cos.name/chinar/">
             R语言会议
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_links" id="linkcat-2">
         <h3 class="widget-title">
          友情链接
         </h3>
         <ul class="xoxo blogroll">
          <li>
           <a href="http://stat.ruc.edu.cn" target="_blank" title="中国人民大学统计学院网站">
            中国人民大学统计学院
           </a>
          </li>
          <li>
           <a href="http://rucdmc.net">
            中国人民大学数据挖掘中心
           </a>
          </li>
          <li>
           <a href="http://birc.gsm.pku.edu.cn/" target="_blank">
            北京大学商务智能研究中心
           </a>
          </li>
          <li>
           <a href="http://sam.cufe.edu.cn/" target="_blank" title="中央财经大学统计与数学学院网站">
            中央财经大学统计与数学学院
           </a>
          </li>
          <li>
           <a href="http://tjx.cueb.edu.cn/" target="_blank" title="首都经济贸易大学统计学院网站">
            首经贸统计学院
           </a>
          </li>
          <li>
           <a href="http://www.shookr.com/">
            数客网大数据社区
           </a>
          </li>
          <li>
           <a href="http://www.xueqing.tv/" target="_blank" title="数据科学在线学习平台">
            雪晴数据网
           </a>
          </li>
          <li>
           <a href="http://iera.name/" target="_blank" title="IERA是一个旨在普及、传播和增进工业工程知识的非营利性网站">
            IERA（直通IE）
           </a>
          </li>
         </ul>
        </aside>
        <aside class="widget widget_categories" id="categories-2">
         <h3 class="widget-title">
          全部分类
         </h3>
         <label class="screen-reader-text" for="cat">
          全部分类
         </label>
         <select class="postform" id="cat" name="cat">
          <option value="-1">
           选择分类目录
          </option>
          <option class="level-0" value="925">
           cos访谈  (4)
          </option>
          <option class="level-0" value="659">
           图书出版  (5)
          </option>
          <option class="level-0" value="379">
           数学方法  (14)
          </option>
          <option class="level-1" value="381">
           分析与代数  (1)
          </option>
          <option class="level-1" value="380">
           概率论  (9)
          </option>
          <option class="level-1" value="382">
           随机过程  (5)
          </option>
          <option class="level-0" value="210">
           数据分析  (81)
          </option>
          <option class="level-1" value="203">
           多元统计  (3)
          </option>
          <option class="level-1" value="42">
           数据挖掘与机器学习  (42)
          </option>
          <option class="level-1" value="36">
           生物与医学统计  (17)
          </option>
          <option class="level-1" value="35">
           计量经济学  (4)
          </option>
          <option class="level-1" value="296">
           金融统计  (3)
          </option>
          <option class="level-1" value="303">
           风险精算  (7)
          </option>
          <option class="level-0" value="177">
           模型专题  (15)
          </option>
          <option class="level-1" value="38">
           回归分析  (10)
          </option>
          <option class="level-1" value="41">
           时间序列  (2)
          </option>
          <option class="level-0" value="784">
           每周精选  (24)
          </option>
          <option class="level-1" value="183">
           可视化  (9)
          </option>
          <option class="level-0" value="967">
           沙龙纪要  (3)
          </option>
          <option class="level-0" value="18">
           经典理论  (46)
          </option>
          <option class="level-1" value="37">
           抽样调查  (3)
          </option>
          <option class="level-1" value="4">
           统计推断  (26)
          </option>
          <option class="level-1" value="236">
           试验设计  (7)
          </option>
          <option class="level-1" value="39">
           非参数统计  (3)
          </option>
          <option class="level-0" value="1">
           统计之都  (279)
          </option>
          <option class="level-1" value="884">
           中国R会议  (2)
          </option>
          <option class="level-1" value="885">
           中国R语言会议  (5)
          </option>
          <option class="level-1" value="446">
           出国留学  (3)
          </option>
          <option class="level-1" value="179">
           推荐文章  (90)
          </option>
          <option class="level-1" value="3">
           新闻通知  (75)
          </option>
          <option class="level-1" value="263">
           统计刊物  (10)
          </option>
          <option class="level-1" value="174">
           网站导读  (40)
          </option>
          <option class="level-1" value="204">
           职业事业  (51)
          </option>
          <option class="level-1" value="213">
           高校课堂  (9)
          </option>
          <option class="level-0" value="178">
           统计计算  (28)
          </option>
          <option class="level-1" value="40">
           优化与模拟  (15)
          </option>
          <option class="level-1" value="43">
           贝叶斯方法  (6)
          </option>
          <option class="level-0" value="378">
           软件应用  (116)
          </option>
          <option class="level-1" value="44">
           统计图形  (36)
          </option>
          <option class="level-1" value="110">
           统计软件  (83)
          </option>
         </select>
        </aside>
        <aside class="widget widget_recent_comments" id="recent-comments-2">
         <h3 class="widget-title">
          最新评论
         </h3>
         <ul id="recentcomments">
          <li class="recentcomments">
           <span class="comment-author-link">
            fineboom
           </span>
           发表在《
           <a href="http://cos.name/2016/06/use-shiny-fleetly-set-up-visual-prototype-system/#comment-7317">
            利用shiny包快速搭建可视化原型系统
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            胡家新
           </span>
           发表在《
           <a href="http://cos.name/2016/06/r%e8%af%ad%e5%8d%83%e5%af%bb%e7%ac%ac%e4%b8%89%e6%9c%9f%ef%bc%9a%e5%bc%a0%e6%97%a0%e5%bf%8c%e7%a9%b6%e7%ab%9f%e7%88%b1%e8%b0%81%ef%bc%9f/#comment-7316">
            R语千寻第三期：张无忌究竟爱谁？
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            <a class="url" href="http://www.zijiacha.com/category.php?id=6" rel="external nofollow">
             南糯山普洱茶
            </a>
           </span>
           发表在《
           <a href="http://cos.name/2016/06/r%e8%af%ad%e5%8d%83%e5%af%bb%e7%ac%ac%e4%b8%89%e6%9c%9f%ef%bc%9a%e5%bc%a0%e6%97%a0%e5%bf%8c%e7%a9%b6%e7%ab%9f%e7%88%b1%e8%b0%81%ef%bc%9f/#comment-7315">
            R语千寻第三期：张无忌究竟爱谁？
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            J
           </span>
           发表在《
           <a href="http://cos.name/2016/05/value-of-the-reputation-from-the-data/#comment-7314">
            数据告诉你：高信誉的卖家应该收高价，还是收低价？
           </a>
           》
          </li>
          <li class="recentcomments">
           <span class="comment-author-link">
            <a class="url" href="http://gg" rel="external nofollow">
             Hilda
            </a>
           </span>
           发表在《
           <a href="http://cos.name/2013/01/drawing-map-in-r-era/#comment-7311">
            R时代，你要怎样画地图？
           </a>
           》
          </li>
         </ul>
        </aside>
        <aside class="widget widget_rss" id="rss-282869971">
         <h3 class="widget-title">
          <a class="rsswidget" href="http://cos.name/cn/topics/feed/">
           <img src="http://cos.name/wp-includes/images/rss.png"/>
          </a>
          <a class="rsswidget" href="http://cos.name/cn/topics/feed/">
           中文论坛新帖
          </a>
         </h3>
         <ul>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/417372/">
            处理时间数据和产生时间序列的问题
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/6790/">
            《统计陷阱》下载 （How to lie with statistics）
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/818/">
            统计学的世界（第五版）
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/16574/">
            class(x) 返回值值是AsIs,AsIs代表什么，有什么用处？
           </a>
          </li>
          <li>
           <a class="rsswidget" href="http://cos.name/cn/topic/417366/">
            如何用R绘制一个分类算法的决策规则
           </a>
          </li>
         </ul>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          登录/RSS
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/wp-admin/">
             登录
            </a>
           </li>
           <li>
            <a href="http://cos.name/feed/" title="使用 RSS 2.0 同步站点内容">
             文章
             <abbr title="Really Simple Syndication">
              RSS
             </abbr>
            </a>
           </li>
           <li>
            <a href="http://cos.name/comments/feed/" title="RSS 上的最近评论">
             评论
             <abbr title="Really Simple Syndication">
              RSS
             </abbr>
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
   <p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <a href="http://www.wumii.com/widget/relatedItems" style="border:0;">
     <img src="http://static.wumii.cn/images/pixel.png"/>
    </a>
   </p>
  </div>
 </body>
</html>